package com.henu.acmrating.crawler;

import org.springframework.stereotype.Component;

@Component
public class BindRun {


    public static void run(String ojName, String id) {
        if(ojName.equals("Codeforces")) {
            CFScoreProcessor.run(id);
            CodeforcesProcessor.run(id);
        } else if(ojName.equals("HDU")) {
            HDUProcessor.run(id);
        } else if(ojName.equals("NowCoder")) {
            NowCoderProcessor.run(id);
        } else if(ojName.equals("VJudge")) {
            VJudgeProcessor.run(id);
        } else if(ojName.equals("LOJ")) {
            LOJProcessor.run(id);
        } else if(ojName.equals("Luogu")) {
            LuoguProcessor.run(id);
        } else if(ojName.equals("Leetcode")) {
            LeetcodeProcessor.run(id);
        }
    }

    public static void crawler(String ojName) {
        if(ojName.equals("Codeforces")) {
            CFScoreProcessor.run_all();
            CodeforcesProcessor.run_all();
        } else if(ojName.equals("HDU")) {
            HDUProcessor.run_all();
        } else if(ojName.equals("NowCoder")) {
            NowCoderProcessor.run_all();
        } else if(ojName.equals("VJudge")) {
            VJudgeProcessor.run_all();
        } else if(ojName.equals("LOJ")) {
            LOJProcessor.run_all();
        } else if(ojName.equals("Luogu")) {
            LuoguProcessor.run_all();
        } else if(ojName.equals("Leetcode")) {
            LeetcodeProcessor.run_all();
        }
    }

}
